﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;

namespace Platform.LanguageProcessing.Expressions
{
	public class SentenceExpression  : GrammarExpression
	{

		public SentenceExpression( IEnumerable<GrammarExpression> subject, VerbExpression verb, IEnumerable<GrammarExpression> predicate )
			: this( new SubjectExpression( subject ), verb, predicate )
		{ }

		public SentenceExpression( SubjectExpression subject, VerbExpression verb, IEnumerable<GrammarExpression> predicate )
			: base( GrammarClass.Sentence )
		{
			this.Subject = subject;
			this.Verb = verb;
			this.Predicate = predicate;
		}


		public bool IsMainSentence
		{
			get;
			private set;
		}

		public SubjectExpression Subject
		{ get; private set; }

		public VerbExpression Verb
		{ get; private set; }

		public IEnumerable<GrammarExpression> Predicate
		{ get; private set; }
	}


	/**
	 * Como
	 * O que
	 * Pq
	 * Onde
	 * Quanto
	 * Quando
	 * Quem
	 */




	public struct WordLocation
	{
		private int start;
		private int length;
		private int line;

		public WordLocation( int start, int len, int line )
		{
			this.start = start;
			this.length = len;
			this.line = line;
		}

		public int Start
		{ get { return this.start; } }

		public int Length
		{ get { return this.length; } }

		public int Line
		{ get { return this.line; } }
	}
}
